﻿/**
 * ...
 * @author wangjun
 */
class cn.eminia.A2.utils.All {
	function All() {
	}
	static function parseVV(str:String, _obj:Object) {
		var obj = (_obj == null || _obj == undefined) ? {} : _obj;
		var arr = str.split(",");
		for (var i = 0; i<arr.length; i++) {
			var oo = arr[i];
			//var ss = oo.split(":");
			//obj[ss[0]] = toTypeFF(ss[1]);
			var id = oo.indexOf(":");
			obj[oo.substring(0, id)] = rightType(oo.substring(id+1, oo.length));
		}
		return obj;
	}
	static function rightType(a) {
		if (a.indexOf("'") == 0 && a.lastIndexOf("'") == a.length-1) {
			 a = a.split("'")[1];
		}
		if (isNaN(a)) {
			return (a);
		} else {
			return Number(a);
		}
	}
	static function top(id) {
		var dd:Number = _root.getNextHighestDepth();
		var mc:MovieClip = _root.attachMovie(id,dd.toString(),dd);
		return mc;
	}
}
